package cn.com.greatwall.system.modules.system.service.dto;

import java.io.Serializable;
import java.util.Objects;
import java.util.Set;

import cn.com.greatwall.common.base.BaseDTO;
import lombok.Getter;
import lombok.Setter;

/**
 * @Author herw
 * @Time 2020-06-28 9:59:46 AM
 * @Version 1.0
 * @Description:
 */
@Getter
@Setter
public class RoleDto extends BaseDTO implements Serializable {
    private Long id;
    private Set<MenuDto> menus;
    private Set<DeptDto> depts;
    private String name;
    private String dataScope;
    private Integer level;
    private String description;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        RoleDto roleDto = (RoleDto) o;
        return Objects.equals(id, roleDto.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }
}
